package net.skyaims.sqlmgr.dao;

import java.util.List;

import net.skyaims.sqlmgr.domain.Idc;

import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
import org.skife.jdbi.v2.sqlobject.customizers.Mapper;

public interface IdcDao {

	@SqlQuery("SELECT * FROM b_idc i WHERE i.id = :id")
	@Mapper(Idc.class)
	Idc getIdcById(@Bind("id") Integer id);

	@SqlQuery("SELECT * FROM b_idc i WHERE i.id < 100")
	@Mapper(Idc.class)
	List<Idc> getAll();

	@SqlUpdate("UPDATE b_idc i SET i.uuid = :uuid WHERE i.id = :id")
	void updateUuidById(@Bind("id") int id, @Bind("uuid") String uuid);

}
